<template>
  <div>
    <headerc :title="title"></headerc>
    <div class="c-main">
      <div class="main-seting" v-if="modifyval">
        <div style="margin: 20px"></div>
        <el-form
          :label-position="labelPosition"
          label-width="80px"
          :model="formLabelAlign"
        >
          <el-form-item label="登录账号">
            <input disabled type="text" />
          </el-form-item>
          <el-form-item label="登录密码">
            <input disabled type="text" />
          </el-form-item>
        </el-form>
        <p @click="modifypwd">修改密码 ➡️</p>
      </div>
      <div class="main-seting" v-if="modifypwdval">
        <div style="margin: 20px"></div>
        <el-form
          :label-position="labelPosition"
          label-width="80px"
          :model="formLabelAlign"
        >
          <el-form-item label="密码">
            <input type="text" />
          </el-form-item>
          <el-form-item label="新密码">
            <input type="text" />
          </el-form-item>
          <el-form-item label="确认密码">
            <input type="text" />
          </el-form-item>
        </el-form>
        <button @click="baocun" class="baocun">保存</button>
        <button @click="quxiao">取消</button>
      </div>
    </div>
  </div>
</template>

<script>
import headerc from "@/components/header.vue";
export default {
  components: {
    headerc,
  },
  data() {
    return {
      title:"账号信息",
      modifyval: true,
      modifypwdval: false,
      labelPosition: "right",
      formLabelAlign: {
        name: "",
        region: "",
        type: "",
      },
    };
  },
  methods: {
    modifypwd() {
      this.modifypwdval = true;
      this.modifyval = false;
    },
    baocun() {
      this.modifypwdval = false;
      this.modifyval = true;
      this.$notify({
        title: "保存",
        message: "保存成功",
        type: "success",
        position: "bottom-right",
      });
    },
    quxiao() {
      this.modifypwdval = false;
      this.modifyval = true;
    },
  },
};
</script>

<style lang="scss" scoped>
.c-main {
  margin-left: 35px;
  height: 700px;
  background: #fff;
  margin-right: 35px;
  position: relative;
  .main-seting {
    padding-top: 30px;
    padding-left: 25%;
    .baocun {
      margin-left: 100px;
      margin-top: 30px;
    }
    button {
      border: 0;
      width: 100px;
      height: 35px;
      margin-left: 30px;
      background: rgba(0, 121, 254, 1);
      color: #fff;
      border-radius: 2px;
    }
    p {
      margin-left: 45%;
      margin-top: 20px;
      cursor: pointer;
      font-size: 14px;
    }
  }
}

input {
  width: 350px;
  height: 30px;
  border: 1px solid #999999;
  border-radius: 2px;
}
</style>